#!/usr/bin/env python
# -*- coding: utf-8 

import time

 
def PrintTiming(func):
    """set up a decorator function for timing"""
    def wrapper(*args, **kargs):
        t1 = time.time()
        res = func(*args, **kargs)
        tel = time.time()-t1
        timeformated = time.strftime( "%H:%M:%S",time.gmtime(tel)) 
        print  '-'*5 + '%s took %0.3f ms' % (func.func_name + str(kargs) + str(args),   (tel)*1000.0)   + '|' + timeformated + '|'+ '-'*10 
        return res
    return wrapper
 
